package com.patMall.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.patMall.service.UserService;

import java.util.Date;
import java.util.List;

/**
 * @Author 750909637@qq.com
 * @PackageName patMall
 * @Package com.patMall.entity
 * @Date 2024/1/10 15:17
 * @Version 1.0
 */
public class Comment {
    Integer commentId;
    Integer userId;
    String commentContent;
    Integer commodityId;
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    Date commentTime;
    private List<CommentImg> commentImgList;
    User user;
    Commodity commodity;

    public Comment() {
    }

    public Comment(Integer userId, String commentContent, Integer commodityId) {
        this.userId = userId;
        this.commentContent = commentContent;
        this.commodityId = commodityId;
    }

    @Override
    public String toString() {
        return "Comment{" +
                "commentId=" + commentId +
                ", userId=" + userId +
                ", commentContent='" + commentContent + '\'' +
                ", commodityId=" + commodityId +
                ", commentTime=" + commentTime +
                ", commentImgList=" + commentImgList +
                ", user=" + user +
                ", commodity=" + commodity +
                '}';
    }

    public Integer getCommentId() {
        return commentId;
    }

    public void setCommentId(Integer commentId) {
        this.commentId = commentId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getCommentContent() {
        return commentContent;
    }

    public void setCommentContent(String commentContent) {
        this.commentContent = commentContent;
    }

    public Integer getCommodityId() {
        return commodityId;
    }

    public void setCommodityId(Integer commodityId) {
        this.commodityId = commodityId;
    }

    public Date getCommentTime() {
        return commentTime;
    }

    public void setCommentTime(Date commentTime) {
        this.commentTime = commentTime;
    }

    public List<CommentImg> getCommentImgList() {
        return commentImgList;
    }

    public void setCommentImgList(List<CommentImg> commentImgList) {
        this.commentImgList = commentImgList;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Commodity getCommodity() {
        return commodity;
    }

    public void setCommodity(Commodity commodity) {
        this.commodity = commodity;
    }
}
